<div class="tableToolbar">
    <div class="coll-md-9" id="addInput">
        <div class="coll-md-15">
            <input type="text" class='search' placeholder="标的名称" ng-model="ctrlScope.itemsearch.itemName">
        </div>
        <div class="coll-md-35 scalenone" id="search2" >
            <div class="coll-md-5">
                <input type="text" class='search' placeholder="姓名" ng-model="ctrlScope.itemsearch.realname">
            </div>
            <div class="coll-md-5">
                <input type="text" class='search' placeholder="电话" ng-model="ctrlScope.itemsearch.mobile">
            </div>
        </div>
        <div class="coll-md-4 scalenone"   id="searchdate" datahide>
            <div class="coll-md-10" >
                <div class="coll-md-5">
                    <p class="input-group">
                        <input type="text" class="search"  placeholder="投资开始日期" uib-datepicker-popup="yyyy-MM-dd"
                               ng-model="ctrlScope.itemsearch.beginDateTimeX" is-open="popup1.opened" datepicker-options="dateOptions"
                               ng-minlength="1"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open1()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                    </p>
                </div>
                <div class="coll-md-5">
                    <p class="input-group">
                        <input type="text" class="search"  placeholder="投资结束日期" uib-datepicker-popup="yyyy-MM-dd"
                               ng-model="ctrlScope.itemsearch.endDateTimeX" is-open="popup2.opened" datepicker-options="dateOptions"
                               ng-minlength="1"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open2()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                    </p>
                </div>

            </div>
        </div>
        <div class="coll-md-1">
            <input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
            <input type="button" class="small-icon search2" value="搜索">
            <input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
            <input type="button" class="small-icon reset" value="重置">

            <div class="dropdown-menu-right">
                <input type="button" class="small-icon more-icon" value="更多" title='更多搜索项' id="more-icon" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false">
                <input type="button" class="small-icon more" value="更多">
                <ul class="dropdown-menu" style='margin-left:80px;' aria-labelledby="dropdownMenu2" more-search>
                    <li><a href="javascript:;">日期搜索</a></li>
                    <li><a href="javascript:;">其他条件搜索</a></li>
                </ul>
            </div>
        </div>
    </div>


</div>

<table ui-table="orderParams">
    <thead>
    <tr>
        <th style="cursor: pointer;padding:0 4px;" ng-click="order('endTime')" ng-class="{true: 'triangle', false: 'orderup'}[onOff]">到期剩余天数</th>
        <th>合同编号</th>
        <th>标的名称</th>
        <th>客户姓名</th>
        <th ng-show="detailData">身份证号</th>
        <th ng-show="detailData">联系电话</th>
        <th>投资期限</th>
        <th>投资金额</th>
        <th>投资日期</th>
        <th>到期日期</th>
        <th>操作</th>
        <th>明细</th>
        <th ng-show="moreData">应付收益次数</th>
        <th ng-show="moreData">已付收益次数</th>
        <th ng-show="moreData">年化收益率</th>
        <th ng-show="moreData">实际收益率</th>
        <th ng-show="moreData">预计总收益</th>
        <th ng-show="moreData">每期收益</th>
    </tr>
    </thead>
    <tbody>

    <tr ng-repeat="item in orderParams.$rows">
        <td>
            <span ng-if="item.dayDiff >=0">{{item.dayDiff}}</span>
            <span ng-if="item.dayDiff ==0">已到期</span>
            <span ng-if="item.dayDiff < 0">已还款</span>
        </td>
        <td>{{item.investOrder}}</td>
        <td>{{item.itemName}}</td>
        <td>{{item.realname}}</td>
        <td ng-show="detailData">{{item.identifyCard}}</td>
        <td ng-show="detailData">{{item.mobile}}</td>
        <td>{{item.itemCycle}}{{item.itemCycleUnit | cycleUnit}}</td>
        <td>{{item.investDealAmount | currency:'￥'}} </td>
        <td>{{item.investTime | date:'y-MM-dd HH:mm:ss'}}</td>
        <td>{{item.endTime | date:'y-MM-dd HH:mm:ss'}}</td>
        <td>
            <a ng-click="download(item.contractsUrl)">查看</a>

        </td>
        <td>
            <a ng-show="detailData" ng-click="DetailData()" >展开</a>
            <a ng-show="moreData" ng-click="hideDetailData()" >收起</a>
        </td>

        <td ng-show="moreData">{{item.earningCount}}</td>
        <td ng-show="moreData">{{item.earnedCount}}</td>
        <td ng-show="moreData">{{item.yearRate}}</td>
        <td ng-show="moreData">{{item.earnings}}</td>
        <td ng-show="moreData">{{item.earnings}}</td>
        <td ng-show="moreData">{{item.oneTimeEarning}}</td>

    </tr>
    </tbody>
</table>